import { COMMUNITY_TYPE } from './abstract-community';
import { DefaultStage } from '../default-stage';
import { AbstractCommunity, IAbstractCommunityOptions } from './abstract-community';
import { ITownData } from '../../data/community';
import { CommunityData } from './community-data';
import { Mesh } from '@babylonjs/core';


interface ITownOptions extends IAbstractCommunityOptions {

}


class Town extends AbstractCommunity {

    constructor(stage: DefaultStage, options: ITownOptions) {
        super(stage, options);
    }

    public get type(): COMMUNITY_TYPE {
        return COMMUNITY_TYPE.TOWN;
    }

    public get data(): ITownData {
        return CommunityData.townData[this.dataIndex];
    }

    protected initializePickMesh(): Mesh {
        const m = super.initializePickMesh();
        m.scaling.set(0.3, 0.08, 0.3);
        m.position.y = 0.04;
        m.visibility = 0;
        return m;
    }

}


export { Town };
export type { ITownOptions };